﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSLMS.Services.Interface;
using GSLMS.Entity;
using GSLMS.Entity.DTO;
using GSLMS.DAL;
namespace GSLMS.Services
{
	/// <summary>
	/// 此层为服务层，已经继承了父类BaseService,已经定义好方法请查看BaseService类；若需要自定义方法请在此层增加并在数据层及接口层定义相关的方法
	/// </summary>
	public partial class SAPP_PROCOMINFO: BaseService<TB_APP_PROCOMINFO>, IAPP_PROCOMINFO
	{
		private static readonly GSLMS.DAL.Oracle.APP_PROCOMINFO dal = new GSLMS.DAL.Oracle.APP_PROCOMINFO();
		public override BaseDAL<TB_APP_PROCOMINFO> DAL
		{
			get { return dal; }
		}

        /// <summary>
        /// 通过立项申请记录ID提取确认方案信息
        /// </summary>
        /// <param name="proID"></param>
        /// <returns></returns>
        public List<GSLMS.Entity.TB_APP_PROCOMINFO> GetAllList(long proID)
        {
            return dal.GetAllList(proID);
        }



        /// <summary>
        /// 确认立项申请的方案信息
        /// </summary>
        /// <param name="model">传入PROID,PROGID,CONFIRMBY,REMARK</param>
        /// <returns></returns>
        public bool ConfrimSolu(GSLMS.Entity.TB_APP_PROCOMINFO model)
        {
            return dal.ConfrimSolu(model);
        }

        /// <summary>
        /// 立项申请确认方案时退回
        /// </summary>
        /// <param name="proID"></param>
        /// <param name="backBy"></param>
        /// <param name="backReason"></param>
        /// <returns></returns>
        public bool BackTo(long proID, string backBy, string backReason)
        {
            return dal.BackTo(proID, backBy, backReason);
        }

        /// <summary>
        /// 验证是否已经确认方案信息
        /// </summary>
        /// <param name="proID">立项申请记录ID</param>
        /// <returns></returns>
        public bool IsSolued(long proID)
        {
            return dal.IsSolued(proID);
        }

        /// <summary>
        /// 通过立项申请记录ID提取已经确认方案信息
        /// </summary>
        /// <param name="proID"></param>
        /// <returns></returns>
        public GSLMS.Entity.TB_APP_PROCOMINFO GetConfirmProComInfo(long proID)
        {
            return dal.GetConfirmProComInfo(proID);
        }
        
	}
}
